home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9596 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: nntp.earthlink.net!usenet
  2. From: laserlight@earthlink.net (Lewis B)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: linked list
  5. Date: Sun, 03 Mar 1996 00:42:09 GMT
  6. Organization: Earthlink Network, Inc.
  7. Message-ID: <4haq0f$1k1@chile.it.earthlink.net>
  8. References: <DnKwDt.Ct0@seas.ucla.edu>
  9. NNTP-Posting-Host: laserlight.earthlink.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. tram@cloudburst.seas.ucla.edu (Tri Tram) wrote:
  13.  
  14. >    I was wondering in a linked list, how do you figure out how you 
  15. >are in a linked list?  And how do you add a node to a link list?  
  16. >suppose I have:
  17.  
  18. >struct Node 
  19. >{
  20. >   char *name;
  21. >   Node *next;
  22. >}
  23.  
  24. >let's say I have
  25. >ann->bob->susie in my list.  how do I go about to get
  26. >ann->bob->lacy->susie?  
  27. >thanks for any help.
  28.  
  29. >--
  30. >-----------------------------------------------------------------
  31. >Tri Tram, Computer Science and Engineering at UCLA
  32. >http://www.seas.ucla.edu/~tram
  33.  
  34. As simply as I can.  change bobs *next to point to lacy and 
  35. lacys *next to point to susie.
  36. It does not matter where in free memory they are in relation to each
  37. other they are as long as the *next pointers know.
  38. Lewis B
  39.  
  40.  
  41.